export const formConfig = {
	inline: false,
	showBtn: true,
	labelPosition: 'top',
	labelWidth: '120px',
	column: [],
}
export const detailConfig = {
	inline: false,
	showBtn: true,
	labelPosition: 'top',
	labelWidth: '120px',
	column: [
		{
			type: 'DividerHtml',
			labelPosition: 'top',
			position: 'center',
			modelValue: '报警信息',
			span: 24,
		},
		{
			label:"报警单位",
			prop:"alarm_organizationName",
			span:12,
		},
		{
			label:"报警时间",
			prop:"alarm_alarmTime",
			span:12,
		},
		{
			label:"报警类型",
			prop:"alarm_alarmReasonLabel",
			span:12,
		},
		{
			type: 'DividerHtml',
			labelPosition: 'top',
			position: 'center',
			modelValue: '调度信息',
			span: 24,
		},
		{
			label:"调度人",
			prop:"createUserName",
			span:12,
		},
		{
			label:"调度时间",
			prop:"createTime",
			span:12,
		},
		{
			label:"调度安全员",
			prop:"staffName",
			span:12,
		},
		{
			label:"紧急类型",
			prop:"urgentTypeLabel",
			span:12,
		},
		{
			label:"调度结果",
			prop:"handleStatus",
			propName:"handleStatusLabel",
			type:'select',
			dicData:[
				{label:"1",value:"已处理",type:"success"}
			],
			span:12,
		}
	],
}
export const otherDetailConfig = {
	inline: false,
	showBtn: true,
	labelPosition: 'top',
	labelWidth: '120px',
	column: [
		{
			type: 'DividerHtml',
			labelPosition: 'top',
			position: 'center',
			modelValue: '处理信息',
			span: 24,
		},
		{
			label:"处理人",
			prop:"handleUserName",
			span:12,
		},
		{
			label:"处理时间",
			prop:"handleTime",
			span:12,
		},
		{
			label:"处理照片",
			type:"upload",
			prop:"handleImgs",
			span:12,
		},
	],
}

export const searchConfig = {
	inline: true,
	showBtn: true,
	labelPosition: 'left',
	column: [
		{
			label: '调度单位',
			prop: 'organizationName',
			type: 'input',
			span: 8,
		},
		{
			label: '报警类型',
			prop: 'alarmReason',
			propName: 'alarmReasonLabel',
			type: 'remoteSelect',
			code: 'OST_ALARM_REASON',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '紧急类型',
			prop: 'urgentType',
			propName: 'urgentTypeLabel',
			type: 'select',
			dicData: [
				{ label: '一般', value: 1 },
				{ label: '紧急', value: 2 },
			],
			span: 8,
		},
		{
			label: '创建时间',
			prop: 'createTimeBetween',
			type: 'dateBetween',
			format: 'YYYY年MM月DD日',
			valueFormat: 'YYYY-MM-DD HH:mm:ss',
			span: 8,
		},
	],
}

export const tableConfig = {
	stripe: true,
	border: true,
	columns: [
		{ label: '调度单位', prop: 'organizationName' },
		{ label: '调度安全员', prop: 'staffName' },
		{ label: '报警类型', prop: 'alarmReasonLabel' },
		{ label: '紧急类型', prop: 'urgentTypeLabel' },
		// { label: '调度结果', prop: 'wu'},
		// { label: '处理结果', prop: 'wu'},
		{
			label: '创建人',
			prop: 'createUserName',
		},
		{ label: '创建时间', prop: 'createTime' },
		{
			label: '操作',
			prop: 'menu',
			width: 200,
			fixed: 'right',
		},
	],
}

export const api = {
	index: 'view_pbDispatch_page',
  // detail:'view_pbDispatch_view',
	authArea: 'authArea',
}
export const baseConfig = {
	pageName: '调度记录',
	dictcodes: ['OST_ALARM_REASON'],
	rowKey: 'id',
	addLabel: '新增',
	tipLabel: 'staffName',
	exportMqTopic: '/ning/export/',
	api,
	auth: {
		...api,
	},
	paramsObj: {
		source: 1,
	},
	menuBtn: [
		{
			icon: 'detail',
			label: '详情',
			type: 'primary',
			operate: 'detail',
			auth: api.index,
			text: true,
			show: true,
		},
		// {
		// 	icon: '',
		// 	label: '处理',
		// 	type: 'primary',
		// 	operate: 'handle',
		// 	auth: api.index,
		// 	text: true,
		// 	show: true,
		// },
	],
	dialogConfig: {
		width: '55%',
	},
	searchConfig,
	tableConfig,
	detailConfig: detailConfig,
}
